package com.htx.zqs.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.htx.zqs.blesmartmask.bean.AfterCourseData;
import com.htx.zqs.blesmartmask.bean.BeforeCourseData;

import com.htx.zqs.greendao.gen.AfterCourseDataDao;
import com.htx.zqs.greendao.gen.BeforeCourseDataDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig afterCourseDataDaoConfig;
    private final DaoConfig beforeCourseDataDaoConfig;

    private final AfterCourseDataDao afterCourseDataDao;
    private final BeforeCourseDataDao beforeCourseDataDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        afterCourseDataDaoConfig = daoConfigMap.get(AfterCourseDataDao.class).clone();
        afterCourseDataDaoConfig.initIdentityScope(type);

        beforeCourseDataDaoConfig = daoConfigMap.get(BeforeCourseDataDao.class).clone();
        beforeCourseDataDaoConfig.initIdentityScope(type);

        afterCourseDataDao = new AfterCourseDataDao(afterCourseDataDaoConfig, this);
        beforeCourseDataDao = new BeforeCourseDataDao(beforeCourseDataDaoConfig, this);

        registerDao(AfterCourseData.class, afterCourseDataDao);
        registerDao(BeforeCourseData.class, beforeCourseDataDao);
    }
    
    public void clear() {
        afterCourseDataDaoConfig.clearIdentityScope();
        beforeCourseDataDaoConfig.clearIdentityScope();
    }

    public AfterCourseDataDao getAfterCourseDataDao() {
        return afterCourseDataDao;
    }

    public BeforeCourseDataDao getBeforeCourseDataDao() {
        return beforeCourseDataDao;
    }

}
